package com.example.newheze.FieldMessage;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Arrays;

public class AnalogData implements Parcelable {
    private String[] date_soil_humi1;
    private float[] info_soil_humi1;
    private String[] date_soil_temp1;
    private float[] info_soil_temp1;
    private String[] date_soil_elect1;
    private float[] info_soil_elect1;
    private String[] date_soil_humi2;
    private float[] info_soil_humi2;
    private String[] date_soil_temp2;
    private float[] info_soil_temp2;
    private String[] date_soil_elect2;
    private float[] info_soil_elect2;
    private String[] date_sunlight;
    private float[] info_sunlight;
    private String[] date_co2;
    private float[] info_co2;
    private String[] date_air_humi;
    private float[] info_air_humi;
    private String[] date_air_temp;
    private float[] info_air_temp;

    public AnalogData(){

    }
    protected AnalogData(Parcel in) {
        date_soil_humi1 = in.createStringArray();
        info_soil_humi1 = in.createFloatArray();
        date_soil_temp1 = in.createStringArray();
        info_soil_temp1 = in.createFloatArray();
        date_soil_elect1 = in.createStringArray();
        info_soil_elect1 = in.createFloatArray();
        date_soil_humi2 = in.createStringArray();
        info_soil_humi2 = in.createFloatArray();
        date_soil_temp2 = in.createStringArray();
        info_soil_temp2 = in.createFloatArray();
        date_soil_elect2 = in.createStringArray();
        info_soil_elect2 = in.createFloatArray();
        date_sunlight = in.createStringArray();
        info_sunlight = in.createFloatArray();
        date_co2 = in.createStringArray();
        info_co2 = in.createFloatArray();
        date_air_humi = in.createStringArray();
        info_air_humi = in.createFloatArray();
        date_air_temp = in.createStringArray();
        info_air_temp = in.createFloatArray();
    }

    public static final Creator<AnalogData> CREATOR = new Creator<AnalogData>() {
        @Override
        public AnalogData createFromParcel(Parcel in) {
            return new AnalogData(in);
        }

        @Override
        public AnalogData[] newArray(int size) {
            return new AnalogData[size];
        }
    };

    public String[] getDate_soil_humi1() {
        return date_soil_humi1;
    }

    public void setDate_soil_humi1(String[] date_soil_humi1) {
        this.date_soil_humi1 = date_soil_humi1;
    }

    public float[] getInfo_soil_humi1() {
        return info_soil_humi1;
    }

    public void setInfo_soil_humi1(float[] info_soil_humi1) {
        this.info_soil_humi1 = info_soil_humi1;
    }

    public String[] getDate_soil_temp1() {
        return date_soil_temp1;
    }

    public void setDate_soil_temp1(String[] date_soil_temp1) {
        this.date_soil_temp1 = date_soil_temp1;
    }

    public float[] getInfo_soil_temp1() {
        return info_soil_temp1;
    }

    public void setInfo_soil_temp1(float[] info_soil_temp1) {
        this.info_soil_temp1 = info_soil_temp1;
    }

    public String[] getDate_soil_elect1() {
        return date_soil_elect1;
    }

    public void setDate_soil_elect1(String[] date_soil_elect1) {
        this.date_soil_elect1 = date_soil_elect1;
    }

    public float[] getInfo_soil_elect1() {
        return info_soil_elect1;
    }

    public void setInfo_soil_elect1(float[] info_soil_elect1) {
        this.info_soil_elect1 = info_soil_elect1;
    }

    public String[] getDate_soil_humi2() {
        return date_soil_humi2;
    }

    public void setDate_soil_humi2(String[] date_soil_humi2) {
        this.date_soil_humi2 = date_soil_humi2;
    }

    public float[] getInfo_soil_humi2() {
        return info_soil_humi2;
    }

    public void setInfo_soil_humi2(float[] info_soil_humi2) {
        this.info_soil_humi2 = info_soil_humi2;
    }

    public String[] getDate_soil_temp2() {
        return date_soil_temp2;
    }

    public void setDate_soil_temp2(String[] date_soil_temp2) {
        this.date_soil_temp2 = date_soil_temp2;
    }

    public float[] getInfo_soil_temp2() {
        return info_soil_temp2;
    }

    public void setInfo_soil_temp2(float[] info_soil_temp2) {
        this.info_soil_temp2 = info_soil_temp2;
    }

    public String[] getDate_soil_elect2() {
        return date_soil_elect2;
    }

    public void setDate_soil_elect2(String[] date_soil_elect2) {
        this.date_soil_elect2 = date_soil_elect2;
    }

    public float[] getInfo_soil_elect2() {
        return info_soil_elect2;
    }

    public void setInfo_soil_elect2(float[] info_soil_elect2) {
        this.info_soil_elect2 = info_soil_elect2;
    }

    public String[] getDate_sunlight() {
        return date_sunlight;
    }

    public void setDate_sunlight(String[] date_sunlight) {
        this.date_sunlight = date_sunlight;
    }

    public float[] getInfo_sunlight() {
        return info_sunlight;
    }

    public void setInfo_sunlight(float[] info_sunlight) {
        this.info_sunlight = info_sunlight;
    }

    public String[] getDate_co2() {
        return date_co2;
    }

    public void setDate_co2(String[] date_co2) {
        this.date_co2 = date_co2;
    }

    public float[] getInfo_co2() {
        return info_co2;
    }

    public void setInfo_co2(float[] info_co2) {
        this.info_co2 = info_co2;
    }

    public String[] getDate_air_humi() {
        return date_air_humi;
    }

    public void setDate_air_humi(String[] date_air_humi) {
        this.date_air_humi = date_air_humi;
    }

    public float[] getInfo_air_humi() {
        return info_air_humi;
    }

    public void setInfo_air_humi(float[] info_air_humi) {
        this.info_air_humi = info_air_humi;
    }

    public String[] getDate_air_temp() {
        return date_air_temp;
    }

    public void setDate_air_temp(String[] date_air_temp) {
        this.date_air_temp = date_air_temp;
    }

    public float[] getInfo_air_temp() {
        return info_air_temp;
    }

    public void setInfo_air_temp(float[] info_air_temp) {
        this.info_air_temp = info_air_temp;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeStringArray(date_soil_humi1);
        parcel.writeFloatArray(info_soil_humi1);
        parcel.writeStringArray(date_soil_temp1);
        parcel.writeFloatArray(info_soil_temp1);
        parcel.writeStringArray(date_soil_elect1);
        parcel.writeFloatArray(info_soil_elect1);
        parcel.writeStringArray(date_soil_humi2);
        parcel.writeFloatArray(info_soil_humi2);
        parcel.writeStringArray(date_soil_temp2);
        parcel.writeFloatArray(info_soil_temp2);
        parcel.writeStringArray(date_soil_elect2);
        parcel.writeFloatArray(info_soil_elect2);
        parcel.writeStringArray(date_sunlight);
        parcel.writeFloatArray(info_sunlight);
        parcel.writeStringArray(date_co2);
        parcel.writeFloatArray(info_co2);
        parcel.writeStringArray(date_air_humi);
        parcel.writeFloatArray(info_air_humi);
        parcel.writeStringArray(date_air_temp);
        parcel.writeFloatArray(info_air_temp);
    }

    @Override
    public String toString() {
        return "AnalogData{" +
                "date_soil_humi1=" + Arrays.toString(date_soil_humi1) +
                ", info_soil_humi1=" + Arrays.toString(info_soil_humi1) +
                ", date_soil_temp1=" + Arrays.toString(date_soil_temp1) +
                ", info_soil_temp1=" + Arrays.toString(info_soil_temp1) +
                ", date_soil_elect1=" + Arrays.toString(date_soil_elect1) +
                ", info_soil_elect1=" + Arrays.toString(info_soil_elect1) +
                ", date_soil_humi2=" + Arrays.toString(date_soil_humi2) +
                ", info_soil_humi2=" + Arrays.toString(info_soil_humi2) +
                ", date_soil_temp2=" + Arrays.toString(date_soil_temp2) +
                ", info_soil_temp2=" + Arrays.toString(info_soil_temp2) +
                ", date_soil_elect2=" + Arrays.toString(date_soil_elect2) +
                ", info_soil_elect2=" + Arrays.toString(info_soil_elect2) +
                ", date_sunlight=" + Arrays.toString(date_sunlight) +
                ", info_sunlight=" + Arrays.toString(info_sunlight) +
                ", date_co2=" + Arrays.toString(date_co2) +
                ", info_co2=" + Arrays.toString(info_co2) +
                ", date_air_humi=" + Arrays.toString(date_air_humi) +
                ", info_air_humi=" + Arrays.toString(info_air_humi) +
                ", date_air_temp=" + Arrays.toString(date_air_temp) +
                ", info_air_temp=" + Arrays.toString(info_air_temp) +
                '}';
    }
}
